{/* LAYOUT模板 */}
	<layout name="layout"/>
{/* LAYOUT模板 */}

{/* import Js,Css */}
	<js href="__PUBLIC__/Js/admin/listTable.js"/>
	<js href="__PUBLIC__/Js/admin/js.util.js"/>
	<css href="__PUBLIC__/Css/admin/common.css"/>
	<js href="__PUBLIC__/Js/admin/js.selectzone.js"/>
	
	<css href="__PUBLIC__/Css/jquery-ui.css" />
	<js href="__PUBLIC__/Js/core/jquery-ui.1.10.4.js" />
	<js href="__PUBLIC__/Js/core/plugins.js"/>
{/* import Js,Css */}

<!-- [position] -->
	<include file="Template:position"/>
<!-- [position] -->

<form action="__URL__/operate_post" method="post" name="theForm">
	<div class="list-div" style="margin-bottom: 5px">
		<table width="100%" cellpadding="3" cellspacing="1">
			<tr>
				<th colspan="4">基本信息</th>
			</tr>
			<tr>
				<td width="18%">
					<div align="right"><strong></strong></div>
				</td>
				<td width="34%">
					<if condition="$order['extension_code'] eq 'group_buy'">
						<a href="group_buy.php?act=edit&id={$order.extension_id}">团购</a>
					<elseif condition="$order['extension_code'] eq 'exchange_goods'" />
						<a href="exchange_goods.php?act=edit&id={$order.extension_id}">积分兑换</a>
					</if>
				</td>
				<td>	
					<div align="right"><strong>下单时间：</strong></div>
				</td>
				<td>{$order.formated_add_time}</td>
			</tr>
			<tr>
				<td>
					<div align="right"><strong>购货人：</strong></div>
				</td>
				<td>{$order.user_name}</td>
				<td>
					<div align="right"><strong>缺货处理：</strong></div>
				</td>
				<td>等待所有商品备齐后再发</td>
			</tr>
			<tr>
				<td>
					<div align="right"><strong>配送方式：</strong></div>
				</td>
				<td>
					<if condition="$exist_real_goods eq 1">
						<if condition="$order['shipping_id'] gt 0">
							{$order.shipping_name}
						<else/>
							{$lang.require_field}
						</if>					
						<if condition="$order['insure_fee'] gt 0">
							（{$lang.label_insure_fee}{$order.formated_insure_fee}）
						</if>
					</if>
				</td>
				<td><div align="right"><strong>配送费用：</strong></div></td>
				<td>{$order.shipping_fee}</td>
			</tr>
			<tr>
				<td><div align="right"><strong>是否保价：</strong></div></td>
				<td>				
					<if condition="$order['insure_yn'] eq 1">
						是
					<else/>
						否
					</if>
				</td>
				<td>
					<div align="right"><strong>保价费用：</strong></div>
				</td>
				<td>{$order.insure_fee}</td>
			</tr>
			<tr>
				<th colspan="4">收货人信息</th>
			</tr>
			<tr>
				<td><div align="right"><strong>收货人：</strong></div></td>
				<td>{$order.consignee}</td>
				<td><div align="right"><strong>电子邮件：</strong></div></td>
				<td>{$order.email}</td>
			</tr>
			<tr>
				<td>
					<div align="right"><strong>地址：</strong></div>
				</td>
				<td>[{$order.region}] {$order.address}</td>
				<td><div align="right"><strong>邮编：</strong></div></td>
				<td>{$order.zipcode}</td>
			</tr>
			<tr>
				<td><div align="right"><strong>电话：</strong></div></td>
				<td>{$order.tel}</td>
				<td><div align="right"><strong>手机：</strong></div></td>
				<td>{$order.mobile}</td>
			</tr>
			<tr>
				<td><div align="right"><strong>标志性建筑：</strong></div></td>
				<td>{$order.sign_building}</td>
				<td><div align="right"><strong>最佳送货时间：</strong></div></td>
				<td>{$order.best_time}</td>
			</tr>
			<tr>
				<td>
					<div align="right"><strong>客户给商家的留言：</strong></div>
				</td>
				<td colspan="3">{$order.postscript}</td>
			</tr>
			</table>
		</div>

	<div class="list-div" style="margin-bottom: 5px">
		<table width="100%" cellpadding="3" cellspacing="1">
			<tr>
				<th colspan="9" scope="col">商品信息</th>
			</tr>
			<tr>
				<td scope="col"><div align="center"><strong>商品名称 [ 品牌 ]</strong></div></td>
				<td scope="col"><div align="center"><strong>货号</strong></div></td>
				<td scope="col"><div align="center"><strong>货品号</strong></div></td>
				<td scope="col"><div align="center"><strong>属性</strong></div></td>
				<if condition="$suppliers_list neq 0">
				<td scope="col"><div align="center"><strong>供货商</strong></div></td>
				</if>
				<td scope="col"><div align="center"><strong>库存</strong></div></td>
				<td scope="col"><div align="center"><strong>数量</strong></div></td>
				<td scope="col"><div align="center"><strong>已发货数量</strong></div></td>
				<td scope="col"><div align="center"><strong>此单发货数量</strong></div></td>
			</tr>
			<volist name="goods_list" id="goods">
				<!--礼包-->
				<if condition="$goods['goods_id'] gt 0 and $goods['extension_code'] eq 'package_buy'">
					<tr>
						<td>{$goods.goods_name}<span style="color:#FF0000;">（礼包）</span></td>
						<td>{$goods.goods_sn}</td>
						<td>&nbsp;<!--货品货号--></td>
						<td>&nbsp;<!--属性--></td>
						<if condition="$suppliers_list neq 0">
						<td><div align="right"></div></td>
						</if>
						<td><div align="right"></div></td>
						<td><div align="right">{$goods.goods_number}</div></td>
						<td><div align="right"></div></td>
						<td><div align="right"></div></td>
					</tr>
					<volist name="$goods['package_goods_list']" id="package">
					<tr>
						<td>--&nbsp;<a href="../goods.php?id={$package.goods_id}" target="_blank">{$package.goods_name}</a></td>
						<td>{$package.goods_sn}</td>
						<td>{$package.product_sn}</td>
						<td>{$package.goods_attr_str}</td>
						<if condition="$suppliers_list neq 0">
						<td><div align="right">{$goods.suppliers_name}</div></td>
						</if>
						<td><div align="right">{$package.storage}</div></td>
						<td><div align="right">{$package.order_send_number}</div></td>
						<td><div align="right">{$package.sended}</div></td>
						<td>
							<div align="right">
								<input name="send_number[{$goods.rec_id}][{$package.g_p}]" 
										type="text" 
										id="send_number_{$goods.rec_id}_{$package.g_p}" 
										value="{$package.send}" size="10" maxlength="11" {$package.readonly}/>
							</div>
							<input type="hidden" name="nihao[]" value="gfg" />
						</td>
					</tr>
					</volist>
				<else/>
					<tr>
						<td>
							<if condition="$goods['goods_id'] gt 0 and $goods['extension_code'] neq 'package_buy'">
								<a href="../goods.php?id={$goods.goods_id}" target="_blank">
									{$goods.goods_name} 
									<if condition="$goods['brand_name'] neq ''">
										[ {$goods.brand_name} ]
									</if>
									<if condition="$goods['is_gift'] eq 1">
										{if $goods.goods_price > 0}
										<if condition="$goods['goods_price'] gt 0">
											（特惠品）
										<else/>
											（赠品）
										</if>
									</if>
									<if condition="$goods['parent_id'] gt 0">
										{$lang.remark_fittings}
									</if>
								</a>
							</if>
						</td>
						<td>{$goods.goods_sn}</td>
						<td>{$goods.product_sn}</td>
						<td>{$goods.goods_attr}</td>
						<if condition="$suppliers_list neq 0">
						<td><div align="right">{$goods.suppliers_name}</div></td>
						</if>
						<td><div align="right">{$goods.storage}</div></td>
						<td><div align="right">{$goods.goods_number}</div></td>
						<td><div align="right">{$goods.sended}</div></td>
						<td>
							<div align="right">
								<input name="send_number[{$goods.rec_id}]" 
										type="text" id="send_number_{$goods.rec_id}" 
										value="{$goods.send}" size="10" maxlength="11" {$goods.readonly}/>
							</div>							
						</td>
					</tr>
				</if>
			</volist>
		</table>
	</div>

	<div class="list-div" style="margin-bottom: 5px">
	<table cellpadding="3" cellspacing="1">
	  <tr>
		<th colspan="6">操作信息</th>
	  </tr>
	  <tr>
		<td><div align="right"><strong>选择供货商：</strong></div></td>
		<td colspan="5">
			<select name="suppliers_id" id="suppliers_id">
				<option value="0" selected="true">请选择供应商</option>
				<volist name="suppliers_name" id="suppliers">
					<option value="{$key}">{$suppliers}</option>
				</volist>
		  </select>
		 </td>
	  </tr>
	  <tr>
		<td>
			<div align="right"><strong>操作备注：</strong></div>
		</td>
	  <td colspan="5"><textarea name="action_note" cols="80" rows="3">{$action_note}</textarea></td>
	  </tr>
	  <tr>
		<td colspan="6" align="center">
			<input name="delivery_confirmed" type="submit" value="确定生成发货单"/>
			&nbsp;&nbsp;
			<input type="button" value="取消" onclick="location.href='order.php?act=info&order_id={$order_id}'" />
			<input name="order_id" type="hidden" value="{$order.order_id}">
			<input name="delivery[order_sn]" type="hidden" value="{$order.order_sn}">
			<input name="delivery[add_time]" type="hidden" value="{$order.order_time}">
			<input name="delivery[user_id]" type="hidden" value="{$order.user_id}">
			<input name="delivery[how_oos]" type="hidden" value="{$order.how_oos}">
			<input name="delivery[shipping_id]" type="hidden" value="{$order.shipping_id}">
			<input name="delivery[shipping_fee]" type="hidden" value="{$order.shipping_fee}">
			<input name="delivery[consignee]" type="hidden" value="{$order.consignee}">
			<input name="delivery[address]" type="hidden" value="{$order.address}">
			<input name="delivery[country]" type="hidden" value="{$order.country}">
			<input name="delivery[province]" type="hidden" value="{$order.province}">
			<input name="delivery[city]" type="hidden" value="{$order.city}">
			<input name="delivery[district]" type="hidden" value="{$order.district}">
			<input name="delivery[sign_building]" type="hidden" value="{$order.sign_building}">
			<input name="delivery[email]" type="hidden" value="{$order.email}">
			<input name="delivery[zipcode]" type="hidden" value="{$order.zipcode}">
			<input name="delivery[tel]" type="hidden" value="{$order.tel}">
			<input name="delivery[mobile]" type="hidden" value="{$order.mobile}">
			<input name="delivery[best_time]" type="hidden" value="{$order.best_time}">
			<input name="delivery[postscript]" type="hidden" value="{$order.postscript}">
			<input name="delivery[how_oos]" type="hidden" value="{$order.how_oos}">
			<input name="delivery[insure_fee]" type="hidden" value="{$order.insure_fee}">
			<input name="delivery[shipping_fee]" type="hidden" value="{$order.shipping_fee}">
			<input name="delivery[agency_id]" type="hidden" value="{$order.agency_id}">
			<input name="delivery[shipping_name]" type="hidden" value="{$order.shipping_name}">
			<input name="operation" type="hidden" value="{$operation}">
		</td>
		</tr>
	</table>
	</div>
</form>
<script language="JavaScript">
  var oldAgencyId = {$order.agency_id};
  onload = function()
  {
    // 开始检查订单
    startCheckOrder();
  }

</script>


